﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace ColorClusteringSOM.Enumerators
{
    public class EnumNeurons : IEnumerator
    {

        private Neuron[] neurons = null;
        int index = -1;

        public EnumNeurons(Neuron[] neurons)
        {
            this.neurons = neurons;
            index = 0;
        }


        public Object Current
        {
            get { return neurons[index]; }
        }

        public bool MoveNext()
        {
            if (index < neurons.Length)
            {
                index++;
                return true;
            }
            return false;
        }

        public void Reset()
        {
            index = -1;
        }
    }
}
